module shader.lightsources;

import std.stream;
import shader.light;

class LightSources {
    Light[] lights;

    this(Stream rawFile) {
        int c;
        rawFile.read(c);
        lights.length = c;
        rawFile.readBlock(lights.ptr,c*Light.sizeof);
    }

    public void clear() {
        lights.length = 0;
    }

    public void addLight(Light l) {
        lights ~= l;
    }

    public int count() {
        return lights.length;
    }
}
